import thenfs from 'then-fs'

// thenfs.readFile('./files/001.txt', 'utf8').then((r1) => {console.log(r1)})
// thenfs.readFile('./files/002.txt', 'utf8').then((r2) => {console.log(r2)})
// thenfs.readFile('./files/003.txt', 'utf8').then((r3) => {console.log(r3)})

thenfs.readFile('./files/0101.txt', 'utf8')
.catch(err=>{
  console.log(err)
})
.then((r1) => {
  console.log(r1)
  return thenfs.readFile('./files/002.txt', 'utf8')
}).then((r2) => {
  console.log(r2)
  return thenfs.readFile('./files/003.txt', 'utf8')
}).then((r3) => {console.log(r3)})
